#include "./status_task.h"
#include "../main_driver/cmd_uart.h"
#include "../main_driver/sensor.h"

namespace main_task {

using namespace main_driver;
using namespace conn;

static constexpr uint16_t VERSION = 0x09;

StatusTask statusTask;

void StatusTask::run() {


    for (;;) {

        cmdUart.notify(
            addr::IPC,
            proto::main::STATUS_UPLOAD,
            VERSION,
            sensor.read(),
            sensor.adc_value()
        );     

        osDelay(500);
    }

}

}
